package com.zhonghui.modlules.user.eshopDomain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.eshop.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(
        value = "UserAddress对象",
        description = "用户地址表"
)
public class UserAddress extends BaseDomain {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("用户地址id")
    @TableId(
            value = "id",
            type = IdType.AUTO
    )
    private Long id;
    @ApiModelProperty("用户id")
    private Long uid;
    @ApiModelProperty("收货人姓名")
    private String realName;
    @ApiModelProperty("收货人电话")
    private String phone;
    @ApiModelProperty("收货人所在省")
    private String province;
    @ApiModelProperty("收货人所在市")
    private String city;
    private Integer cityId;
    @ApiModelProperty("收货人所在区")
    private String district;
    @ApiModelProperty("收货人详细地址")
    private String detail;
    @ApiModelProperty("邮编")
    private String postCode;
    @ApiModelProperty("经度")
    private String longitude;
    @ApiModelProperty("纬度")
    private String latitude;
    @ApiModelProperty("是否默认")
    private Integer isDefault;

    public static UserAddress.UserAddressBuilder builder() {
        return new UserAddress.UserAddressBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public String getRealName() {
        return this.realName;
    }

    public String getPhone() {
        return this.phone;
    }

    public String getProvince() {
        return this.province;
    }

    public String getCity() {
        return this.city;
    }

    public Integer getCityId() {
        return this.cityId;
    }

    public String getDistrict() {
        return this.district;
    }

    public String getDetail() {
        return this.detail;
    }

    public String getPostCode() {
        return this.postCode;
    }

    public String getLongitude() {
        return this.longitude;
    }

    public String getLatitude() {
        return this.latitude;
    }

    public Integer getIsDefault() {
        return this.isDefault;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setRealName(final String realName) {
        this.realName = realName;
    }

    public void setPhone(final String phone) {
        this.phone = phone;
    }

    public void setProvince(final String province) {
        this.province = province;
    }

    public void setCity(final String city) {
        this.city = city;
    }

    public void setCityId(final Integer cityId) {
        this.cityId = cityId;
    }

    public void setDistrict(final String district) {
        this.district = district;
    }

    public void setDetail(final String detail) {
        this.detail = detail;
    }

    public void setPostCode(final String postCode) {
        this.postCode = postCode;
    }

    public void setLongitude(final String longitude) {
        this.longitude = longitude;
    }

    public void setLatitude(final String latitude) {
        this.latitude = latitude;
    }

    public void setIsDefault(final Integer isDefault) {
        this.isDefault = isDefault;
    }

    public UserAddress(final Long id, final Long uid, final String realName, final String phone, final String province, final String city, final Integer cityId, final String district, final String detail, final String postCode, final String longitude, final String latitude, final Integer isDefault) {
        this.id = id;
        this.uid = uid;
        this.realName = realName;
        this.phone = phone;
        this.province = province;
        this.city = city;
        this.cityId = cityId;
        this.district = district;
        this.detail = detail;
        this.postCode = postCode;
        this.longitude = longitude;
        this.latitude = latitude;
        this.isDefault = isDefault;
    }

    public UserAddress() {
    }

    public static class UserAddressBuilder {
        private Long id;
        private Long uid;
        private String realName;
        private String phone;
        private String province;
        private String city;
        private Integer cityId;
        private String district;
        private String detail;
        private String postCode;
        private String longitude;
        private String latitude;
        private Integer isDefault;

        UserAddressBuilder() {
        }

        public UserAddress.UserAddressBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserAddress.UserAddressBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public UserAddress.UserAddressBuilder realName(final String realName) {
            this.realName = realName;
            return this;
        }

        public UserAddress.UserAddressBuilder phone(final String phone) {
            this.phone = phone;
            return this;
        }

        public UserAddress.UserAddressBuilder province(final String province) {
            this.province = province;
            return this;
        }

        public UserAddress.UserAddressBuilder city(final String city) {
            this.city = city;
            return this;
        }

        public UserAddress.UserAddressBuilder cityId(final Integer cityId) {
            this.cityId = cityId;
            return this;
        }

        public UserAddress.UserAddressBuilder district(final String district) {
            this.district = district;
            return this;
        }

        public UserAddress.UserAddressBuilder detail(final String detail) {
            this.detail = detail;
            return this;
        }

        public UserAddress.UserAddressBuilder postCode(final String postCode) {
            this.postCode = postCode;
            return this;
        }

        public UserAddress.UserAddressBuilder longitude(final String longitude) {
            this.longitude = longitude;
            return this;
        }

        public UserAddress.UserAddressBuilder latitude(final String latitude) {
            this.latitude = latitude;
            return this;
        }

        public UserAddress.UserAddressBuilder isDefault(final Integer isDefault) {
            this.isDefault = isDefault;
            return this;
        }

        public UserAddress build() {
            return new UserAddress(this.id, this.uid, this.realName, this.phone, this.province, this.city, this.cityId, this.district, this.detail, this.postCode, this.longitude, this.latitude, this.isDefault);
        }

        public String toString() {
            return "UserAddress.UserAddressBuilder(id=" + this.id + ", uid=" + this.uid + ", realName=" + this.realName + ", phone=" + this.phone + ", province=" + this.province + ", city=" + this.city + ", cityId=" + this.cityId + ", district=" + this.district + ", detail=" + this.detail + ", postCode=" + this.postCode + ", longitude=" + this.longitude + ", latitude=" + this.latitude + ", isDefault=" + this.isDefault + ")";
        }
    }
}

